package com.livesource.client.web.liveTaskBoard;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.livesource.client.LiveSourceGlobalVariables;
import com.livesource.client.utilities.TitlePanel;

/**
 * 
 * @Feature
 */
public class LiveTaskBoard extends VerticalPanel {

	public LiveTaskBoard() {

		this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

		this.add(new TitlePanel(" ", buttonRefreshClickHandler()));

		this.add(new BoardPanel());

	}

	private static ClickHandler buttonRefreshClickHandler() {

		return (new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

				BoardPanel.showTasks(LiveSourceGlobalVariables.projectEntries);
			}
		});
	}
}
